#include <stdio.h>
#include "../include/bitmap.h"

int main(void) {
  int x = 100;

  Bitmap *bits = bitmap_create(150, 0);
  if (bits == NULL) {
    printf("bitmap_create failed!\n");
  }

  unsigned int ret = 1;
  bitmap_get(bits, x, &ret);
  if (ret == 0) {
    printf("bitmap_get pass!\n");
  }

  bitmap_set(bits, 50, 1);
  ret = 0;
  bitmap_get(bits, 50, &ret);
  if (ret == 1) {
    printf("bitmap_set pass!\n");
  }

  printf("bitmap length: %d\n", bitmap_length(bits));

  bitmap_destory(&bits);
  if (bits == NULL) {
    printf("bitmap_destory pass!\n");
  }

  return 0;
}